From: Florian Müllner Date: Mon, 28 Jan 2019 00:40:51 +0000 (+0100) Subject: lint: Allow multiple spaces before key values X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~845^2^2~43 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=42b77e7ba54e716cad63007fec2d6215236d27c9;p=gnome-shell.git lint: Allow multiple spaces before key values This is useful for imitating namespaced flags/enums: ``` const FooFlags = { NONE: 0, SMEAGLY: 1 << 0, SMOGLEY: 1 << 1, MUGGLY: 1 << 2 }; ``` https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/609 --- diff --git a/lint/eslintrc-shell.json b/lint/eslintrc-shell.json index 194966b13..9c4c96bba 100644 --- a/lint/eslintrc-shell.json +++ b/lint/eslintrc-shell.json @@ -7,6 +7,14 @@ "allow": ["^vfunc_", "^on_"] } ], + "key-spacing": [ + "error", + { + "mode": "minimum", + "beforeColon": false, + "afterColon": true + } + ], "object-curly-spacing": [ "error", "always"